<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<script src="./jquery.js"></script>
		<title></title>
		<style type="text/css">
			.tit{
				color: #f60;
				font-size: 24px;
				text-align: center;
			}
		</style>
	</head>
	<body>
		url:<input type="text" name="" id="url" value="" /> <br>
		reg:<input type="text" name="" id="reg" value="" />
		<button type="button" id="sub">sub</button>
		<div id="con"></div>
	<script type="text/javascript">
		$(function(){
			$("#sub").click(function(){
				const url = $("#url").val()
				const reg = $("#reg").val()
				console.log(url,reg);
				$.ajax({
					url: "http://localhost:3000/",
					type:"get",
					data:{
						url,
						reg
					},
					success:function(e){
						if(!reg){
							$("#con").get(0).innerHTML = e.data
							return
						}
						let str = ""
						console.log(e.data);
						const data = e.data
						for (let i = 0; i < data.length; i++) {
							console.log(data[i]);
							str += `<div class="tit">匹配的第${i}个数据:</div><br>${data[i].join("<br>")}<br>`
						}
						$("#con").get(0).innerHTML = str
					},
					error:function(err){
						console.log("err",err);
					}
				})
			})
			
			
		})
	</script>	
	</body>
</html>